package cs131.pa1.filter.sequential;

import cs131.pa1.filter.Message;

import java.util.LinkedList;
import java.util.List;

public class PwdCommand extends SequentialFilter{
	public final static String COMMAND = "pwd";

	public PwdCommand(List<String> commands) {


	}

	public void process(){

		if(input != null && input.size() !=0){
			System.out.print(Message.CANNOT_HAVE_INPUT.with_parameter(COMMAND));
			return ;
		}

		if(next == null){
			System.out.println(SequentialREPL.currentWorkingDirectory);
		} else {
			if(output == null){
				output = new LinkedList<String>();
			}
			output.add(SequentialREPL.currentWorkingDirectory);
		}
	}

	@Override
	protected String processLine(String line) {
		// TODO Auto-generated method stub
		return null;
	}
			
}
